home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Workbench Design
/
WB Collection.iso
/
workbench werkzeuge
/
palette tools
/
colorsaver
/
dimmer.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1996-04-07
|
1KB
|
46 lines
/*
* ColorSaver ARexx example
* ColorSaver needs to be running.....
*
* Dim's the screen by setting all of the colors to half their
* present value, delays a bit, then returns the screen to normal
*/
Options FailAt 100
Options Results
Delay = 10
if ~show(p, 'COLORSAVER.1') then
do
Say ' '
Say 'Please start COLORSAVER first...'
exit
end
Address COLORSAVER.1 STOREPALETTE
Say ' '
Say ' This ColorSaver ARexx example will dim your screen by setting'
Say ' each color value to half it''s present value. The screen will'
Say ' remain dimmed for 'delay' seconds, then be returned to normal'
Say ' '
Address COLORSAVER.1 NUMCOLORS /* get number of colors */
Parse VAR Result Count
do i=0 to Count-1
Address 'COLORSAVER.1' 'SELECT' i
Address COLORSAVER.1 GETRGB
Parse VAR Result Red Green Blue
Red = Red/2
Blue = Blue/2
Green = Green/2
/* Say 'Color = 'i 'R = 'Red 'G = ' Green 'B = 'Blue */
Address 'COLORSAVER.1' 'SETRGB Color='i', R='Red', G='Green', B='Blue
end
Address COMMAND wait delay
Address COLORSAVER.1 CANCEL